﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace VisionEstereo
{
    /// <summary>
    /// Lógica de interacción para Window1.xaml
    /// </summary>
    public partial class ElegirFiltro : Window
    {
        public ElegirFiltro()
        {
            InitializeComponent();
            this.tamVentanaBox.Text = "3";
        }

        private void confirmarClick(object sender, RoutedEventArgs e)
        {
            int tam = Int32.Parse(this.tamVentanaBox.Text);
            if (tam > 2 && tam <= 15)
            {
                this.DialogResult = true;
                this.Close();
            }
            else System.Windows.Forms.MessageBox.Show("El tamaño debe estar entre 3 y 15 y debe ser impar");
        }

        private void cancelarClick(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
